﻿using System;

namespace Rcon
{
	public class GameType : IGameType
	{
		private string gameType = null;
        private int playlistNum = -1;

		public GameType(int playlistNum, string gameType)
		{
			if (playlistNum.Equals(-1) || String.IsNullOrEmpty(gameType))
			{
				throw new ArgumentException("Game type may not be null nor empty.");
			}
            this.playlistNum = playlistNum;
			this.gameType = gameType;
		}

		/// <summary>
		/// Gets the game type. Does not allow setting.
		/// </summary>
		public string GameName
		{
			get
			{
				return gameType;
			}
			set
			{
				throw new NotImplementedException();
			}
		}

        /// <summary>
        /// Gets the playlist number. Does not allow setting.
        /// </summary>
        /// <returns></returns>
        public int PlayListNum
        {
            get
            {
                return playlistNum;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

		public override string ToString()
		{
			return gameType;
		}
	}
}
